﻿// Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

// added namespace
using MyTravelPostModel;
using System.Data;

namespace MyTravelPostService
{
    // The simple service requests that show
    // CRUD operations on the Entity Data Model
    [ServiceContract]
    public interface IMyTravelPostService
    {
        // Returns all the travel blogs that have postings
        [OperationContract]
        List<Blog> GetAllTravelBlogs();

        // gets the blog by ID
        [OperationContract]
        Blog GetBlog(int blogID);

        // returns the latest blog posting from passed in blog.
        [OperationContract]
        BlogPost GetLatestBlogPosting(Blog blog);

        // Get the people in the system
        [OperationContract]
        List<Person> GetPeople();

        // Adds new comments
        [OperationContract]
        Comment AddComment(Comment newComment);

        // Delete the comments from the system
        [OperationContract]
        void DeleteComment(Comment deleteComment);

        // Will search for existing comments and merge the two lists together.
        [OperationContract]
        List<Comment> UpdateComments(List<Comment> orginalComments, List<Comment> updatedComments);

        // will take a blog and update to the new blog owner only by the entity key
        [OperationContract]
        void ChangeBlogowner(Blog blog, EntityKey newBlogOwnerKey);
    }
}
